def get_digit(x):
    s1 = 0  # 存储累加和
    lst1 = []  # 存储提取的数字
    for item in x:
        if item.isdigit():
            lst1.append(int(item))
    s1 = sum(lst1)
    return lst1, s1


# 准备函数的调用
x = input('请输入一个字符串：')
lst, s = get_digit(x)
print(lst, s)
